This script makes the reader confirm before submitting a form.
Discussion
A form's onSubmit event
handler must return true for the form to submit. In this
example, a confirm dialog returns true or false and submission
occurs only on confirmation. (You can tell when the page submits
because it will reload.)